package com.cmsky.open.user.model;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import com.cmsky.open.core.base.*;
import com.cmsky.open.core.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import com.cmsky.open.user.model.*;
import com.cmsky.open.user.dao.*;
import com.cmsky.open.user.manager.*;
import com.cmsky.open.user.vo.query.*;

/**
 * @author jandyfish email:jandyfish(a)gmail.com
 * @version 1.0
 * @since 1.0
 */


public class UserFamilyInfo extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "UserFamilyInfo";
	public static final String ALIAS_ID = "编号";
	public static final String ALIAS_USER_ID = "成员";
	public static final String ALIAS_FUSER_ID = "户主";
	
	//date formats
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
    /**
     * 编号       db_column: id 
     */	
	
	private java.lang.Integer id;
    /**
     * 成员       db_column: user_id 
     */	
	@NotNull 
	private java.lang.Integer userId;
    /**
     * 户主       db_column: fuser_id 
     */	
	@NotNull 
	private java.lang.Integer fuserId;
	//columns END

	public UserFamilyInfo(){
	}

	public UserFamilyInfo(
		java.lang.Integer id
	){
		this.id = id;
	}

	public void setId(java.lang.Integer value) {
		this.id = value;
	}
	
	public java.lang.Integer getId() {
		return this.id;
	}
	public void setUserId(java.lang.Integer value) {
		this.userId = value;
	}
	
	public java.lang.Integer getUserId() {
		return this.userId;
	}
	public void setFuserId(java.lang.Integer value) {
		this.fuserId = value;
	}
	
	public java.lang.Integer getFuserId() {
		return this.fuserId;
	}
	
	private UserInfo userInfo;
	private UserInfo fUserInfo;
	
	public UserInfo getfUserInfo() {
		return fUserInfo;
	}

	public void setfUserInfo(UserInfo fUserInfo) {
		this.fUserInfo = fUserInfo;
	}

	public void setUserInfo(UserInfo userInfo){
		this.userInfo = userInfo;
	}
	
	public UserInfo getUserInfo() {
		return userInfo;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("UserId",getUserId())
			.append("FuserId",getFuserId())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof UserFamilyInfo == false) return false;
		if(this == obj) return true;
		UserFamilyInfo other = (UserFamilyInfo)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.append(getUserId(),other.getUserId())
			.append(getFuserId(),other.getFuserId())
			.isEquals();
	}
}

